age = input("请输入你的年龄：  ")
age = int(age)
if age >= 18:
    print("成年")
else:
    if age >= 12:
        print("少年")
    else:
        print("儿童")
        
number = 20
guess = -1
print("数字猜谜游戏")
while guess != number:
    guess = int(input("请输入你猜的数字："))

    if guess == number:
        print("恭喜，你猜对了")
    elif guess > number:
        print("小了")
    elif guess < number:
        print("大了")

number = 10
i = 0
while i < number:
    print(i)
    i += 1
    if i == 7:
        break           
else:
    print("执行完毕！")


var = 100
if var < 200:
    print("比200小！")
    if var == 150:
        print('这是150')
    elif var == 100:
        print('这是100')
    elif var == 50:
        print('这是50')
elif var < 50:
    print("比50小！")
else:
    print("无法判断正确的值！")

print("Good bye!")

n = 100
sum = 0
counter = 1
while counter <= n:
    sum = sum + counter
    counter += 1

print("1 到 %d 之和为: %d" % (n,sum))


number = 10
i = 0
# i = 11
while i < number:
    print(i)
    i += 1
else:
    print("执行完毕！")
